// 设置一个变量，存储key值
const TOKEN_KEY = 'hmtt71'
// 封装保存key到localStorage
export const setToken = function (tokenObj) {
  window.localStorage.setItem(TOKEN_KEY, JSON.stringify(tokenObj))
}
// 封装获取localStorage的token
export const getToken = function () {
  return JSON.parse(window.localStorage.getItem(TOKEN_KEY))
}
// 封装删除localStorage的token
export const removeToken=()=>{
    window.localStorage.removeItem(TOKEN_KEY)
}

